Skip to content

fix(deploy): preserve maintenance owner context - #885

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/schema-fence-lifetime-go116-20261012
Oct 12, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
fix/schema-fence-lifetime-go116-20261012

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

变更说明 / Summary

schema claim 的单次 RPC 结束后会取消请求 context,原先 retained physical fence 也把该请求 context 当作 owner 生命周期,导致后续 worker/status 立即拒绝。现在 schema controller 持有独立 owner context,保留到 controller 生命周期结束;建立连接和获取锁仍使用原来单次操作的预算。

普通部署入口保持原有 context 行为。四个文件直接基于正式 Go116 源码,只调整 internal/deploycli 的 schema fence 生命周期并新增回归测试;API 运行源码、Web、依赖、协议和打包输入与正式116一致。

与上游的关系 / Upstream relationship

  • LMM API 独有变更 / LMM API-specific change
  • 上游尚未合并的修复或功能 / Change not yet merged upstream
  • 同步或移植上游变更 / Upstream sync or backport
  • 不适用(文档、CI、仓库维护等)/ Not applicable

上游参考 / Upstream reference: N/A(本项目原生部署控制器)

关联 Issue / Related issue

N/A;修复 schema claim 后 retained fence 错误继承单次 RPC context 的生命周期。

变更类型 / Type of change

  • Bug 修复 / Bug fix
  • 新功能 / Feature
  • 重构或性能优化 / Refactor or performance
  • 前端或交互 / Frontend or UX
  • 部署、CI 或构建 / Deployment, CI, or build
  • 文档或仓库维护 / Documentation or maintenance

验证 / Verification

测试源码:3adaf17b2444a73f435bef4865381d2538670179,签名、干净工作树;父提交为正式116源码 d8a90269ee2cd29d926ac1b3caa02f68725237ef。

go -C apps/api-go test -race ./internal/deploycli -run '^Test(ProductionMerchantStoreFenceOwner|SchemaMaintenance(FenceLifetime|Owner|Worker|RPC(Protocol|PhaseBudgets|AbortActions|ReplyLimits|NestedEmpty)|AbortFreeze)|SchemaControllerRemoteCapture)' -count=1 -timeout=240s -json
PASS: Go1.25.1 race; 17 top-level tests, 61 pass events, zero skips.
ActualPostgres lifetime regression: owned isolated no-TCP PostgreSQL18.6 actually exercised.
just test-deploy-entrypoint
PASS: deployment entrypoint 18 + web ship 17 tests.
gofmt -l <four changed Go files>; git diff --check HEAD^ HEAD
PASS: no formatting or whitespace changes required.

原始通过日志已通过正式 scripts/local-release-tests.py import 导入,并逐项 verify 到同一源码;未重跑或重标其他源码的测试。测试模拟 RPC request 生命周期并使用真实隔离 PostgreSQL;未声明完整 Unix RPC/systemd claim 或生产 PG17 验收。应用源码与正式116对象一致,复用既有应用验证;未重复完整 API/Web 矩阵或本地应用构建。本 PR 尚未部署。

截图或日志 / Screenshots or logs

保留原始 verification、Go JSON stdout 和入口 stderr。原始 verification SHA256:a1a7ccd5ab9ac54087a32c576a91949f1aa4186b7e3799712cd72b92ba56021d;正式 Go 记录:e639baad6403b454d9dae377d6377e989e6755344d51af9d9b7471a41ef4b575;入口记录:bf0dd6e6630f41af3cc48d33a99ade7e66a3ac151350aceee0ed20a6bf654898。

提交检查 / Checklist

  • 我已搜索本仓库的 Issues 和 PRs,确认没有重复工作。(本地准备阶段尚未执行远程搜索)
  • 此 PR 只包含与当前目标相关的改动,未混入格式化或其他无关变更。
  • 我已说明该变更对当前产品流程或兼容行为的影响,并保留必要的来源、版权和许可证信息。
  • 我已检查兼容性;无接口或数据库格式变化。
  • 我已补充或更新相关测试,并在上方记录实际验证结果及跳过项。
  • 受影响的文档、示例配置和多语言文案已核对;本次原生 controller 生命周期修复无需修改。
  • 代码、日志、截图和提交记录中不包含 API Key、Cookie、Token、密码、DSN 或其他敏感信息。

Copilot AI balanced review requested due to automatic review settings October 12, 2026 05:48
@LIghtJUNction
LIghtJUNction merged commit a8fe651 into main Oct 12, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@LIghtJUNction
LIghtJUNction deleted the fix/schema-fence-lifetime-go116-20261012 branch November 5, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants